<template>
	<view>
		<view class="bgw wrapper">
			<view class="blank30"></view>
			<view class="flex">
				<view class="font-28 flex-1 font-bold">
					{{detail['单号']}}
				</view>
				<u-tag text="已提交" plain size="mini" type="primary" v-if="detail['状态'] == 's1_handin'"></u-tag>
				<u-tag text="草稿" plain size="mini" type="info" v-else-if="detail['状态'] == 's0_draft'"></u-tag>
				<u-tag text="已批准" plain size="mini" type="success" v-else-if="detail['状态'] == 's2_accepted'"></u-tag>
				<u-tag text="驳回" plain size="mini" type="error" v-else-if="detail['状态'] == 's3_rejected'"></u-tag>
				<u-tag text="已下单" plain size="mini" type="info" v-else></u-tag>
			</view>
			<view class="blank20"></view>
			<u-line></u-line>
			<view class="blank20"></view>
			<view class="">
				<text class="text-gray font-24">创建时间：</text>
				<text>{{detail['创建时间']}}</text>
			</view>
			<view class="blank10"></view>
			<view class="">
				<text class="text-gray font-24">最近更新：</text>
				<text>{{detail['最近更新']}}</text>
			</view>
			<view class="blank20"></view>
			<view class="bg-gray">
				<view class="blank20"></view>
				<view class="flex">
					<view class="flex-1 text-center">
						<view class="text-gray font-24">申请</view>
						<view class="blank10"></view>
						<view>{{detail['申请人']}}</view>
					</view>
					<view class="flex-1 text-center">
						<view class="text-gray font-24">已批准</view>
						<view class="blank10"></view>
						<view :class="detail['批准条数']>0 ? 'text-green':''">
							{{detail['批准条数']}}
						</view>
					</view>
					<view class="flex-1 text-center">
						<view class="text-gray font-24">已下单</view>
						<view class="blank10"></view>
						<view :class="detail['下单条数']>0 ? 'text-primary':''">{{detail['下单条数']}}</view>
					</view>
				</view>
				<view class="blank20"></view>
			</view>
			<view class="blank20"></view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"purchase-info",
		props: {
			detail: Object
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style>

</style>